home *** CD-ROM | disk | FTP | other *** search
/ Drivin' Route 66 / Drivin' Route 66 (1995)(Creative Multimedia)[Mac-PC].iso / pc / rtsm.dir / 00050_Script_MAIN < prev    next >
Text File  |  1995-08-18  |  3KB  |  126 lines

  1. on startMovie
  2.   repeat with s = 3 to 8
  3.     set the visible of sprite s to 0
  4.     set the lineSize of sprite s to 0
  5.   end repeat
  6.   noSprites
  7. end 
  8.  
  9. on puppetExternalSound soundname
  10.   global where
  11.   sound playfile 1, where & soundname
  12.   updatestage
  13. end
  14.  
  15.  
  16. on stopMovie
  17.   noSprites
  18.   unloadCast
  19. end
  20.  
  21. on noSprites
  22.   repeat with p = 1 to 48
  23.     puppetSprite p,0
  24.   end repeat
  25.   updateStage
  26. end 
  27.  
  28. on synchStory
  29.   if soundBusy(1) then
  30.     repeat while soundBusy(1)
  31.       if the mouseDown then
  32.         exit repeat
  33.         puppettransition 23
  34.       end if
  35.       puppettransition 23
  36.     end repeat
  37.   end if
  38.   if ((the frame + 1) = marker(1)) OR (the frame = 66) OR (the mouseDown) then
  39.     sound stop 1
  40.     sound stop 2
  41.     puppetTransition 0
  42.     updateStage
  43.     if the frame < 45 then
  44.       go "menu 1"
  45.     else
  46.       go "menu 2"
  47.     end if
  48.   end if
  49. end 
  50.  
  51.  
  52. on gomenu
  53.   global storyTarget
  54.   -- Handles mouseDown in menu
  55.   repeat with  s = 3 to 8 
  56.     if rollOver(s) then
  57.       set the foreColor of sprite s to 209
  58.       set the visible of sprite s to 1
  59.       updateStage
  60.       -- Put here to ensure a valid click:
  61.       -- put the name of cast mouseCast() into cName
  62.       repeat while the mouseDown
  63.         nothing
  64.       end repeat
  65.       doDelay
  66.       sound stop 1
  67.       sound stop 2
  68.       repeat with  s = 3 to 8 
  69.         puppetSprite s,0
  70.         updateStage
  71.       end repeat
  72.       put the name of cast mouseCast() into cName
  73.       if char 1 of cName = "s" then
  74.         delete char 1 of cName
  75.         put integer(cName) into storyTarget
  76.         -- put storyTarget
  77.         go ("story" && string(storyTarget))
  78.       end if
  79.       exit repeat
  80.     else
  81.       set the foreColor of sprite s to 29
  82.       set the visible of sprite s to 0
  83.     end if
  84.   end repeat
  85.   updateStage
  86. end 
  87.  
  88.  
  89. on dealWithManics
  90. end 
  91.  
  92. on idle
  93.   global storyTarget
  94.   cursor -1
  95.   put the frame into f
  96.   if f = 21 OR f = 26 then
  97.     -- menu 1:
  98.     set the mouseDownScript to "gomenu"
  99.     repeat with  s = 3 to 8 
  100.       puppetSprite s,1
  101.       if rollOver(s) then
  102.         set the foreColor of sprite s to 29
  103.         if the lineSize of sprite s <> 3 then
  104.           set the lineSize of sprite s to 3
  105.         end if
  106.         if the visible of sprite s <> 1 then
  107.           set the visible of sprite s to 1
  108.         end if
  109.       else
  110.         set the foreColor of sprite s to 29
  111.         set the visible of sprite s to 0
  112.         set the lineSize of sprite s to 0
  113.       end if
  114.       updateStage
  115.     end repeat
  116.   else
  117.     set the mouseDownScript to ""
  118.     -- ??
  119.   end if
  120.   if soundBusy(1) then
  121.     set the volume of sound 1 to 160
  122.     set the volume of sound 2 to 64
  123.   else
  124.     set the volume of sound 2 to 150
  125.   end if
  126. end